#include <bits/stdc++.h>

using namespace std;

class Solution
{
public:
    int findLengthOfLCIS(vector<int> &nums)
    {
        vector<int> dp(nums.size(), 1);
        int max_length = 1;

        for (int i = 1; i < (int)nums.size(); i++)
        {
            if (nums[i] > nums[i - 1])
            {
                dp[i] = dp[i - 1] + 1;
            }
            if (dp[i] > max_length)
            {
                max_length = dp[i];
            }
        }

        return max_length;
    }
};

int main()
{
    vector<int> nums{1, 3, 5, 4, 7};
    Solution sol;
    cout << sol.findLengthOfLCIS(nums) << endl;
    return 0;
}